<?php

App::uses('AppController', 'Controller');

class HomesController extends AppController {

	var $name = 'Homes';

	
	
	
	/**
	 * List user
	 *
	 * @param type  meta
	 * @return type  meta
	 * @access public
	 */
	function admin_index() {


	}
	
	function loadJsTemplate($name = null, $path = null)
	{
		if( empty( $name ) ) exit;
		
		$this->layout = 'ajax';
				
		$pathfull = $path;
		
		if(!empty($path))
			$pathfull .= '/'.$name;
		else 
			$pathfull = $name;
			
		// check path of elements
		$tmpl = $this->render( "/Elements/jstemplate/". $pathfull, false );
		$tmpl = preg_replace('/<!--(.*)-->/Uis', '', $tmpl);
	}
	
}
